﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdminLogin.aspx.cs" Inherits="BooksSalesSys001.admin.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>登录页面</title>
    <!-- 引用 Bootstrap 的 CSS 文件 -->
    <link href="../assert/lib/css/bootstrap.min.css" rel="stylesheet" />
    <!-- 引用自定义的 JavaScript 验证函数 -->
    <script type="text/javascript">
        function validateForm() {
            var account = document.getElementById('<%= TxtAccount.ClientID %>').value;
            var password = document.getElementById('<%= TxtPassword.ClientID %>').value;

            if (account.trim() === "") {
                alert("账号不能为空！");
                return false;
            }

            if (password.trim() === "") {
                alert("密码不能为空！");
                return false;
            }

            return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return validateForm();">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-4">
                    <div class="card mt-5">
                        <div class="card-body text-center">
                            <!-- Logo -->
                            <%--<asp:Image ID="ImgLogo" runat="server" Height="150px" Width="150px" CssClass="mb-3" />--%>
                            <h1 class="mb-3">后台管理系统</h1>
                            
                            <!-- 账号 -->
                            <div class="form-group">
                                <label for="TxtAccount">账号：</label>
                                <asp:TextBox ID="TxtAccount" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                            
                            <!-- 密码 -->
                            <div class="form-group">
                                <label for="TxtPassword">密码：</label>
                                <asp:TextBox ID="TxtPassword" runat="server" CssClass="form-control" TextMode="Password"></asp:TextBox>
                            </div>
                            
                            <!-- 登录按钮 -->
                            <asp:Button ID="BtnCostomerLogin" runat="server" CssClass="btn btn-primary btn-block" Text="登录" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>

    <!-- 引用 Bootstrap 的 JS 文件 -->
    <script src="../assert/lib/js/bootstrap.bundle.min.js"></script>
</body>
</html>
